# Contributor: Bjoern Schilberg <bjoern@intevation.de>
# Maintainer: Bjoern Schilberg <bjoern@intevation.de>
pkgname=freexl
pkgver=2.0.0
pkgrel=0
pkgdesc="Library to extract valid data from within an Excel (.xls) spreadsheet"
url="https://www.gaia-gis.it/fossil/freexl/index"
arch="all"
license="MPL-1.1 GPL-2.0-only LGPL-2.1-only"
makedepends="expat-dev minizip-dev"
subpackages="$pkgname-dev"
source="http://www.gaia-gis.it/gaia-sins/freexl-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix /usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	# rm -rf "$pkgdir"/usr/share/
}

sha512sums="
663ccc321c2f0dcab8ad9255b2a77066c2046d531a0aa723fb114301fa27b53bf980787dd2548c46541036eceef988c5eedf2bec053adf628929470e67ddc17a  freexl-2.0.0.tar.gz
"
